package com.kantboot.business.water.domain.entity;

import com.kantboot.util.core.jpa.KantbootGenerationType;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * 水站提水点
 */
@Entity
@Getter
@Setter
@Table(name = "bus_water_lifting_point")
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
@DynamicUpdate
@DynamicInsert
public class BusWaterLiftingPoint implements Serializable {


    /**
     * 主键
     */
    @Id
    @GenericGenerator(name = "snowflakeId", strategy = KantbootGenerationType.SNOWFLAKE)
    @GeneratedValue(generator = "snowflakeId")
    @Column(name = "id")
    private Long id;

    /**
     * 提水点名称
     */
    @Column(name = "t_name", length = 64)
    private String name;

    /**
     * 提水点地址
     */
    @Column(name = "t_address", length = 64)
    private String address;

    /**
     * 一级行政区名称
     */
    @Column(name = "adlv1_name", length = 64)
    private String adlv1Name;

    /**
     * 二级行政区名称
     */
    @Column(name = "adlv2_name", length = 64)
    private String adlv2Name;

    /**
     * 三级行政区名称
     */
    @Column(name = "adlv3_name", length = 64)
    private String adlv3Name;

    /**
     * 一级行政区编码
     */
    @Column(name = "adlv1_adcode", length = 64)
    private String adlv1Adcode;

    /**
     * 二级行政区编码
     */
    @Column(name = "adlv2_adcode", length = 64)
    private String adlv2Adcode;

    /**
     * 三级行政区编码
     */
    @Column(name = "adlv3_adcode", length = 64)
    private String adlv3Adcode;

    /**
     * 提水点经度
     */
    @Column(name = "t_lng", length = 64)
    private Double lng;

    /**
     * 提水点纬度
     */
    @Column(name = "t_lat", length = 64)
    private Double lat;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;


}
